<%@ page pageEncoding="UTF-8"%>
<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://snack.com/tag" prefix="sn" %>
<!DOCTYPE html>
<html>
<head>
<jsp:include page="/inc/_html_head.jsp"></jsp:include>
</head>
<body>
<!--头-->
<jsp:include page="/inc/_page_header.jsp"></jsp:include>

<!--身-->
<div class="page-main">
	<!--左导航菜单-->
    <jsp:include page="/inc/_menu.jsp"></jsp:include>
    <!--主显示区域-->
    <div class="main">
        <div class="wapper">
            <h2>管理员列表</h2>
            <div class="view">
            	<!--搜索区-->
            	<div class="tab-option">
                    <ul class="tabBnt" id="tabBar">
                        <li class="act"><a href="#">按条件搜索</a> </li>
                    </ul>
                    <div class="tabBox">
                    	<div class="tabCtn">
                        	<form action="${pageContext.request.contextPath}/admin/list.html" method="post">
		                    	<div><label>管理员名称：</label><input type="text" name="id" value="${id}" placeholder="请输管理员名称" /></div>
	                        	<div><label></label><button type="submit" />确定</button></div>
		                	</form>
		                </div>
                    </div>
                </div>
                <div class="h25"></div>
                <!--列表区-->
                <div>
                        <table class="thinLineTable" width="100%">
                            <thead>
                                <tr>
                                    <th style="width:50px;">编号</th>
                                    <th style="width:60px;">帐号</th>
                                    <th style="width:50px;">状态</th>
                                    <th style="width:80px;">创建时间</th>
                                    <th style="width:80px;">最后登录时间</th>
                                    <th style="width:80px;">管理</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr class="trow1">
                                    <td>1</td>
                                    <td><a href="#">123</a></td>
                                    <td>激活</td>
                                    <td>2012-07-15 09:45:26</td>
                                    <td>2012-07-15 09:45:26</td>
                                    <td>
                                    	<a id="show" target="_blank" href="${pageContext.request.contextPath}/main/admin/box_show.jsp">
                                    		<img alt="查看" title="查看" src="${pageContext.request.contextPath}/res/images/btn/show.gif">
                                    	</a>
                                    	<a id="modify" target="_blank" href="${pageContext.request.contextPath}/main/admin/box_modify.jsp">
                                    		<img alt="修改" title="修改" src="${pageContext.request.contextPath}/res/images/btn/editor.gif">
                                    	</a>
                                    	<a id="delete" target="_blank" href="${pageContext.request.contextPath}/main/admin/box_del.jsp">
                                    		<img alt="删除" title="删除" src="${pageContext.request.contextPath}/res/images/btn/del.gif">
                                    	</a>
                                    </td>
                                </tr>
                            </tbody>
                            <!-- 
                            <tbody>
                            	<c:if test="${fn:length(page.items) > 0}">
                            	<c:forEach var="pa" items="${page.items}" varStatus="pas">
                                <tr class="${pas.index % 2 ==0?'trow1':'trow2' }">
                                    <td>${pas.index+1}</td>
                                    <td><a href="#">${pa.username}</a></td>
                                    <td>
                                    	<c:if test="${pa.status == 0}">禁用</c:if>
                                    	<c:if test="${pa.status == 1}">激活</c:if>
                                    </td>
                                    <td><fmt:formatDate value="${pa.createAt}" pattern="yyyy-MM-dd HH:mm:ss" timeZone="Asia/Shanghai"/></td>
                                    <td><fmt:formatDate value="${pa.lastLoginAt}" pattern="yyyy-MM-dd HH:mm:ss" timeZone="Asia/Shanghai"/></td>
                                    <td>
                                    	<a id="show" target="_blank" href="${pageContext.request.contextPath}/admin/show.do?id=${pa.username}">
                                    		<img alt="查看" title="查看" src="${pageContext.request.contextPath}/res/images/btn/show.gif">
                                    	</a>
                                    	<a id="modify" target="_blank" href="${pageContext.request.contextPath}/admin/show.do?id=${pa.username}&met=modify">
                                    		<img alt="修改" title="修改" src="${pageContext.request.contextPath}/res/images/btn/editor.gif">
                                    	</a>
                                    	<a id="delete" target="_blank" href="${pageContext.request.contextPath}/admin/show.do?id=${pa.username}&met=del">
                                    		<img alt="删除" title="删除" src="${pageContext.request.contextPath}/res/images/btn/del.gif">
                                    	</a>
                                    </td>
                                </tr>
                                </c:forEach>
                                </c:if>
                                <c:if test="${fn:length(page.items) < 1}">
                                	<td colspan="6">暂无数据</td>
                                </c:if>
                            </tbody>
                             -->
                        </table>
                        <!-- 
	                    <c:if test="${page.itemCount != 0}">
						<div class="pager">
							<nd:page pageIndex="${page.pageIndex}" pageSize="${page.pageSize}" action="${pageContext.request.contextPath}/admin/list.do" itemCount="${page.itemCount}"  conditions="name" queryValues="${name}"/>
						</div>							
						</c:if>
						 -->
                </div>
            </div>
        </div>
    </div>
</div>

<!--页脚-->
<jsp:include page="/inc/_page_footer.jsp"></jsp:include>
</body>
<script src="${pageContext.request.contextPath}/res/js/placeholder.js"></script>
<script type="text/javascript">
	$(document).ready(function(){
		//show
		$("a#show").fancybox({
				'padding' : 0,
				'scrolling' :'no',
				'autoScale':true,
				'width'	: '50',
				'height' : '20',
				'type' : 'iframe'
		});
		
		//modify
		$("a#modify").fancybox({
				'padding' : 0,
				'scrolling' :'no',
				'autoScale':true,
				'width'	: '50',
				'height' : '25',
				'type' : 'iframe',
				onClosed:function(){
					window.location.reload();
				}
		});
		//delete
		$("a#delete").fancybox({
				'padding' : 0,
				'scrolling' :'no',
				'autoScale':true,
				'width'	: '50',
				'height' : '20',
				'type' : 'iframe',
				onClosed:function(){
					window.location.reload();
				}
		});
	});
</script>
</html>
